home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d6 / procalc_.arc / PROCALC.DOC < prev    next >
Text File  |  1988-05-08  |  22KB  |  531 lines

  1.         
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.                  P r o C A L C
  23.  
  24.  
  25.  
  26.              Designed and written by
  27.  
  28.       Robert D. Miller  and  William A. Osterhagen
  29.             
  30.              September, 1987
  31.  
  32.  
  33. Introduction
  34.  
  35.     Welcome to ProCALC!  More than just a handy tool for
  36. arithmetic calculations, ProCALC solves a wide variety of
  37. algebraic, trigonometric and technical problems using arithmetic
  38. operations and more than fifty pre-defined functions. In
  39. addition, ProCALC permits user-defined formulas and named
  40. variables which may be saved to disk and later reused.
  41. Technical users will appreciate the precision and wide range
  42. of floating point numbers: all calculations are done in 80-bit
  43. floating point whether the numeric processor (8087, 287 or 387)
  44. chip is installed or not. Functions are accurate to very near
  45. the arithmetic limits.
  46.  
  47.     Programmers will find ProCALC especially useful
  48. since it will do exact arithmetic on long (32-bit)
  49. integers, has a full set of logical operators, and does
  50. bit manipulation. Additional number bases of two, eight,
  51. and sixteen may be used in calculations. For financial work
  52. and planning, a set of calendar functions are an integral
  53. part of ProCALC.
  54.  
  55.     To use ProCALC:
  56.  
  57.     For monochrome, enter PROCALC    or PROCALC <filename>
  58.  
  59.     For color, enter      PROCALC /C or PROCALC <filename>/C
  60.  
  61. where <filename> loads a file, created from some previous
  62. ProCALC session, containing user-defined variables and/or
  63. formulas. If your computer is in color mode, ProCalc will
  64. begin using color. Some computers (such as the AT&T 6300)
  65. having a green or amber screen look better if forced into
  66. a monochrome mode.  ProCalc will run in a monochrome mode
  67. by typing: PROCALC /M.
  68.  
  69.     If you have a numeric coprocessor chip installed, this
  70. program will automatically use it. Otherwise, ProCALC will
  71. emulate the 8087 chip.
  72.  
  73.     ProCALC greets you with its calculator screen -- you're
  74. ready to start calculating. For example, key in 1 + 2 + 3 and
  75. press <ENTER> to obtain the result of 6. We'll talk about details
  76. later, but for now observe the screen layout.  The ProCALC
  77. screen is divided into four separate areas:
  78.  
  79.     1) the uppermost FORMULA edit area,
  80.     2) the middle CALCULATE edit area,
  81.     3) the lower RESULT or message area,
  82.     4) the bottom FUNCTION key descriptions.
  83.  
  84.     The bottom two lines of the screen define the function keys as:
  85.  
  86.  F1: CALC
  87.      Clears calculate edit area and enters calculate edit mode
  88.      for entering and/or editing a new calculator problem.
  89.  
  90.  F2: ReCALC
  91.      Recalls the last calculator problem entered for editing
  92.      and/or re-calculation.
  93.  
  94.  F3: VARIABLES
  95.      Displays user-defined variables and their values.
  96.  
  97.  F4: FORMULAS
  98.      Displays user-defined formulas and their names.
  99.  
  100.  F5: GetFormula
  101.      Used to make, recall, delete, or change a formula.
  102.  
  103.  F6: UseFormula
  104.      Executes the current formula from the FORMULA area.
  105.  
  106.  F7: Degrees/Radians
  107.      Specifies how trigonometric angles are entered
  108.      and displayed.
  109.  
  110.  F8: Scientific/Floating Point result
  111.      Toggles between scientific notation and floating
  112.      point display. Shift F8 in floating point mode
  113.      increments the number of digits displayed in the
  114.      fraction by 2 each time it is pressed.
  115.  
  116.  
  117.  F9: RESULT
  118.      Specifies how results are displayed:
  119.        Dec (decimal)
  120.      # Bin (binary)
  121.      & Oct (octal)
  122.      $ Hex (hexadecimal)
  123.          # ExR (Extended precision Real), binary 80-bit
  124.                representation used by the numeric processor chip.
  125.                Full software emulation is provided if the ship
  126.                is not installed.
  127.        DMS (degrees or hours, minutes, seconds).
  128.  
  129.  F10: HELP
  130.       Displays list of operators, constants, and functions.
  131.  
  132.     At any time while the calculator screen is displayed, you may
  133. press the FUNCTION keys <F3: VARIABLES>,  <F4: FORMULAS> or <F10:
  134. HELP>.  Doing so interrupts your current work and displays the
  135. appropriate data on a blank screen.  If multiple screens of
  136. information are available, they are displayed by continuing to
  137. press the same function key. Pressing the function key after
  138. observing the last page returns to the calculator screen.
  139. Pressing <ESC> immediately returns you to the calculator
  140. screen -- exactly where you were when you originally pressed the
  141. function key.
  142.  
  143.     You can tell which part of the screen you're using by the
  144. highlighted area name. If none are highlighted, the bottom of the
  145. screen informs you how to load or save user-defined variables
  146. and/or formulas to or from disk.  More about this later.
  147.  
  148. CALCULATE
  149.  
  150.     You begin a calculator problem by pressing <F1: CALC> or by
  151. starting to key in the problem. <F2: ReCalc> displays the last
  152. problem you entered and allows you to edit and/or re-calculate
  153. it. When you're done editing, press <ENTER> and the answer is
  154. displayed in the RESULT area. The solution  is displayed in the
  155. base specified by <F9: RESULT>. You have three lines (of 74
  156. characters per line) to work with in the CALCULATE edit area.
  157. Edit keys include:
  158.  
  159.     <ARROW> ..... Moves the cursor up, down, left, or right.
  160.     <DELETE>..... Deletes the character under the cursor.
  161.     <INSERT>..... Inserts a space at the cursor position.
  162.     <BACK SPACE>. Deletes the character preceding the cursor.
  163.     <HOME>....... Moves the cursor to leftmost position of the
  164.           current line.
  165.     <END>........ Moves the cursor to the rightmost position
  166.           of the current line.
  167.     <CTRL END>... Clears from the cursor to the end of the line.
  168.     <CTRL DELETE> Deletes the line (on most systems).
  169.     <CTRL INSERT> Inserts a blank line (on most systems).
  170.     <ESC>........ Exits edit mode with no calculation.
  171.     <ENTER>...... Displays calculated results in the result area.
  172.  
  173. USER VARIABLES:
  174.  
  175.     Calculated results can be saved as user-defined variables
  176. (use <F3: VARIABLES> for the current user-variable list) and
  177. variables may be used in subsequent calculations. A user variable
  178. must begin with a letter and cannot exceed 12 letters and/or
  179. digits in length. Variable names may not be pre-defined operator,
  180. function, constant, or formula names. The results of the current
  181. calculation may be saved in a user-defined variable by starting
  182. the problem with the user variable name and an equal sign (=).
  183. The last calculated result is saved in a user-defined variable by
  184. entering the variable name followed by equals (=).
  185.     For example:
  186.  
  187.     MYVAR = 1 + 2 + 3 <ENTER> . . . displays result of 6
  188.                     saved in MYVAR.
  189.  
  190.     Or another way:
  191.  
  192.     1 + 2 + 3 <ENTER> . . . . . . . gives a result of 6.
  193.     MYVAR = . . . . . . . . . . . . assigns the previous result
  194.                     (6) in MYVAR.
  195.  
  196.     The user-defined variable MYVAR may now be used in other
  197. calculator problems.  For example, after trying one of the above
  198. examples:
  199.  
  200.     9 * MYVAR <ENTER> . . . . . . . returns a result of
  201.                     54, or 9 * 6.
  202.  
  203.     A user-defined variable is deleted from the user-variable
  204. list by entering the user-defined variable followed by a minus
  205. (-). A complete list of user-defined variables may be displayed
  206. at any time by pressing the <F3: VARIABLES> function key.
  207.  
  208. USER FORMULAS:
  209.  
  210.     Formulas are defined using operators, functions, constants,
  211. and/or user variables. A formula must be defined before it is
  212. used. As with variable names, a formula name may not be that of a
  213. predefined operator, function, constant or user-defined variable.
  214.  
  215.     You define a formula by pressing  <F5: GetFormula> and typing
  216. the formula name.  Then press <ENTER> and key the formula just as
  217. though you were entering a calculator problem. Once you've edited
  218. the formula, press <ENTER> to save the definition in the formula
  219. list. You can press <F4: FORMULAS> at any time to see your
  220. formula list.
  221.  
  222.     If you press <ESC> while entering either a formula name or a
  223. formula, the formula name returns to  < n o n e >, the formula
  224. edit area remains intact, and you exit the formula area.  If the
  225. formula name you enter is already present in the formula list,
  226. that formula is displayed for editing.  If a formula name is all
  227. spaces and you press <ENTER>, a formula name of  < n o n e >  is
  228. displayed, the formula edit area is cleared, and you exit the
  229. formula area.
  230.     You execute a formula in one of the following three ways:
  231.  
  232.     1) The formula displayed in the FORMULA area is executed by
  233.        pressing the <F6: UseFormula> function key. Note: if a
  234.        formula is not present in the FORMULA area, the formula's
  235.        name is  < n o n e >;
  236.  
  237.     2) By entering in the CALCULATE area the name of an existing
  238.        formula and pressing <ENTER>;
  239.  
  240.     3) By entering a variable, followed by an equals sign (=),
  241.        followed by a formula name and pressing <ENTER>.  The
  242.        result of the formula calculation is then displayed and
  243.        saved in that variable.
  244.  
  245.     A formula is executed much the same as if it were a normal
  246. calculator problem. If a variable appearing in your formula is
  247. not defined (i.e., not in the user-variable list), then the
  248. CALCULATE area is highlighted and you are asked to key in the
  249. variable's value. You can type in numerical value, or even an
  250. arithmetic expression -- except that you may not use another
  251. formula name or assign the result to a variable with an equal (=)
  252. sign.  This step is repeated for each undefined variable in the
  253. formula being executed.
  254.  
  255.     Here, as an example, is the formula for calculating the
  256. length of the hypotenuse of a right triangle (using the
  257. Pythagorean theorem). To request the triangle's two sides at the
  258. time of execution, you could use ProCALC as described below.
  259.  
  260.     1) Press <F5: GetFormula>;
  261.     2) Key in a name (ex: Pyth) and press <ENTER>;
  262.     3) Key in the formula:
  263.        SQRT ( OneSide ^ 2 + OtherSide ^ 2 ) <ENTER>;
  264.     4) Press <F6: UseFormula>;
  265.     5) When `CALCULATE: OneSide' is highlighted,
  266.        key  300 <ENTER>;
  267.     6) When `CALCULATE: OtherSide' is highlighted,
  268.        key  400 <ENTER>;
  269.     7) The RESULT 500 is displayed.
  270.  
  271.     In the above example, instead of keying in the number 300
  272. for OneSide, you could have typed in any complex expression.
  273.  
  274.     Also, if `OneSide' or `OtherSide' had already been assigned a
  275. value (i.e., if either were a previously defined user variables),
  276. then ProCALC would have used that value instead of asking
  277. for it.
  278.  
  279.     You may modify and save an existing formula under a new name.
  280. First, call the formula with <F5: GetFormula>. Edit it, press
  281. <ESCAPE>, and press <F5: Getformula> again. Enter the new name
  282. and hit <ENTER> -- then press <ENTER> again to save the edited
  283. formula into the user formula list. To delete a formula from the
  284. formula list, simply press <F5: GetFormula> and type the name of
  285. the formula to be deleted followed by minus sign (-).
  286.  
  287. NUMBERS:
  288.  
  289.     Numbers may be entered as you ordinarily would with any 
  290. calculator. Integers are numbers with no decimal fraction and
  291. they may range from -2147483648 to 2147483647. ProCALC will
  292. do exact operations on integers.  The integer operators
  293. DIV and MOD will do exact division and remainders. For example:
  294. 22 DIV 7 gives a result of 3, since the fraction is dropped.
  295. Entering: 22 MOD 7, returns the remainder, 1, since 22 divided
  296. by 7 is 3, remainder 1. The logical operators (AND, OR, XOR,
  297. NOT, IMP and EQV) and the shift operators (ASHIFT, SHIFT, ROTATE)
  298. do bit-by-bit operations on integers.
  299.  
  300.     Floating point or real numbers may be entered with a
  301. decimal point. Scientific notation may be used, where the
  302. 'E' (or 'e') following the number means "times ten to the power".
  303. One thousand may be entered as: 1000.0, or 1.0E3. ProCALC's
  304. floating point numbers have a very large dynamic range
  305. (the difference between the largest and smallest numbers).
  306. The largest number is roughly 1.18973e4932. The smallest non-
  307. zero number is about 1.0e-4931. Since the constants pi (3.14...),
  308. halfpi, and twopi are used frequently, you only have to
  309. remember to type in those names; ProCalc knows their values
  310. to the full precision of the computer.
  311.  
  312.     For computer programmers, particularly, integers may be
  313. entered in three other commonly used bases: 2 (binary),
  314. 8 (octal) and 16 (hexadecimal). Prefixing a number with
  315. # interprets the number as binary (and accepts only the digits
  316. 0 and 1). Beginning a number with & means it's octal
  317. (using digits 0 through 7) and using $ treats the number
  318. as hexadecimal, permitting digits 0 through 9 as well
  319. as A through F (for the hex digits 10 through 15).
  320. For example, entering #1001 (binary) is equivalent to
  321. the decimal number 9. The octal number &207 is 135 in
  322. base ten. Very large binary, octal or hexadecimal numbers
  323. (outside the range plus or minus two billion) are permitted
  324. in ProCALC, although the logical and shift operators
  325. shouldn't be used with them, since they are processed as
  326. floating point numbers. Just make the leading digit a 0.
  327. For example $0FFFFCAF900 is the decimal number 1099508152576.
  328.  
  329. DISPLAY RESULTS:
  330.  
  331.     The default mode for results is scientific notation. For example:
  332. 0.00234 is displayed as 2.34000000e-3. You can use the <F8> key to
  333. toggle to the floating point display mode. An indicator shown by
  334. the <F8> selection at the bottom of the ProCALC screen shows "Sci"
  335. for the scientific notation and an "Fpt" for floating point.
  336. Notice when the "Fpt" is selected, a number following that indicator
  337. tells how many digits past the decimal point will be printed.
  338. The displayed number is correctly rounded to that precision.
  339. The number of fraction digits displayed may be increased by 2
  340. each time the <SHIFT F8> is pressed. After reaching a maximum of
  341. 14 digits, the <SHIFT F8> will recycle.
  342.  
  343.     Occasionally, the results may not fit the selected option.
  344. In such situations, the number is displayed "the best way".
  345. Integers will always be shown with no decimal point.
  346.  
  347.     ProCALC works with an incredibly large range of numbers.
  348. It is possible for some results to exceed this range. Numbers
  349. larger than 1.0e4932 are regarded and displayed as "infinity".
  350. Extremely small numbers may result as "unnormal" or "denormal".
  351. These may be safely regarded as zero. Some complex operations
  352. or error conditions may result in a number that can not be
  353. expressed, in which case "NAN" (not a number) is displayed.
  354. ProCALC tries very hard to catch error conditions and gracefully
  355. recover from these somewhat peculiar situations; it actually
  356. does much better than many mathematical computer programming
  357. languages!
  358.  
  359.     Several other display options may be selected with the
  360. <F9> key. Integer results may be chosen to be shown in binary,
  361. octal or hexadecimal. Pressing <F9> repeatedly cycles through
  362. the list of options; while <SHIFT F9> returns to decimal display.
  363. For those of you who need to know what the numeric processor is
  364. doing, an ExR (Extended Real) display option is included. 
  365. The DMS option prints output in degrees, minutes and
  366. seconds; when using DMS, be sure to remember to select Degrees 
  367. mode with <F7>. The DMS display mode is very handy when working
  368. with calculations involving time.
  369.  
  370.     A note on the Extended Real display format: the ExR selection
  371. displays a number as it is in the numeric processor You aren't
  372. required to have one to use this option. A complete description of
  373. this format is in the Intel reference manuals for the 8086 and
  374. later processors. Briefly, the number is displayed in five 16-bit
  375. groups. the first group is the exponent (biased by 16383 or hex 3FFF).
  376. The first bit is the sign. This format uses a signed magnitude
  377. representation, so negative numbers are just like positive ones,
  378. only having the first bit set to 1. Try entering PI and -PI and
  379. observe the difference. The remaining four groups are the 64 bits
  380. of the mantissa. The binary point is taken to be after the first
  381. mantissa bit (which for normalized numbers is a 1). Displaying PI
  382. in this mode you get:
  383.  
  384.     01000000 00000000 11001001 00001111 11011010 10100010
  385.                       00100001 01101000 11000010 00110101
  386.  
  387. The first group contains the exponent. The first bit is zero,
  388. so the number is positive. The exponent is biased by hex 3FFF or
  389. 16383, so to get the true exponent, subtract the bias. Ok,
  390. #0100000000000000 - #0011111111111111 is 1. The first sixteen bits
  391. of the fraction are 1100100100001111. Remembering the binary point
  392. comes after the high order bit, so the first part of the mantissa
  393. is really 1.10010000001111 which is about decimal 1.57077.
  394. Since the binary exponent is 1, the number is the mantissa
  395. multiplied by 2^1 or 2. The first sixteen bits of the fraction
  396. multiplied by one power of 2 give 1.57077 * 2 = 3.14154, not
  397. a bad approximation to pi. The remaining bits just provide
  398. additional precision.
  399.  
  400. PRINTING:
  401.  
  402.     ProCALC can print the results of a calculation on your printer.
  403. After doing a calculation, pressing <Alt> and P simultaneously
  404. will print the lines of the calculate edit entry area and the results.
  405. An <Alt> F will print the displayed formula. This option may not
  406. work on a few of the "near compatibles", such as the Tandy 1000.
  407. Of course, the shift print screen will print any page entirely
  408. and may be useful for making a printed list of variables and
  409. formulas displayed with the <F3> and <F4> keys.
  410.  
  411. LOADING and SAVING:
  412.  
  413.     ProCALC lets you save your variables and formulas to disk.
  414. After completing a calculation, a message displayed at the bottom
  415. of the screen reminds you how to save and load user files.
  416. Variables and formulas are SAVED to disk by pressing `S' while
  417. holding down the <ALT> key. You'll be prompted to enter the
  418. filename. When saving user variables and/or formulas to disk,
  419. all user-defined variables and formulas are copied to disk in a
  420. single file.  The disk files containing formulas and variables
  421. may be shared with other ProCalc users.
  422.  
  423.     Variables and formulas are LOADED in from disk by pressing
  424. `L' while holding down the <ALT> key. You will be prompted for
  425. the name of the file to be loaded. When loading a file of user
  426. variables and formulas in from disk, any variables and formulas
  427. already in memory are not disturbed.  When duplicate names are
  428. found, however, the variables and/or formulas loaded in from disk
  429. replace those in memory.
  430.  
  431. PLEASE:
  432.  
  433.     ProCALC is a unique and powerful time-saving tool which will
  434. serve a wide variety of users. A great deal of effort and care
  435. has gone into its preparation. It is our desire to make ProCALC
  436. available to the greatest possible number of users, we are
  437. distributing it as "shareware". We ask that you please register
  438. each copy of ProCALC for a reasonable fee of $20. We believe that
  439. ProCALC is worth far more than this. A registration/order form
  440. is on the next page.
  441.  
  442.     ProCALC is distributed on a program disk as PROCALC.EXE with
  443. this user's guide on the file PROCALC.DOC, to copy to your printer.
  444.  
  445.     To register your copy, please complete the registration form
  446. (or send your name, address and computer model) along with $20
  447. for each copy to:
  448.  
  449.                     Robert Miller
  450.                     1837 Burrwood Circle
  451.                     East Lansing
  452.                     Michigan   48823.
  453.  
  454.     A new disk and manual may be ordered for $30. When ordering,
  455. please specify standard floppy or the 3 1/2-inch format.
  456.  
  457.  
  458.     We would like to know your future needs. If a future version
  459. of this product were to be provided, what features would you use
  460. the most?  Would you like to see graphics incorporated, complex
  461. numbers and functions, vectors, matrices or extended precison
  462. arithmetic.  If you have particularly interesting or novel
  463. applications, we would like to hear from you too.
  464.  
  465. DISCLAIMER:
  466.  
  467.     The authors have made every effort to make ProCALC the best
  468. product possible. However, as we have no control over its use,
  469. we must state this disclaimer: The authors claim no responsibility
  470. for loss or damages resulting, either directly or indirectly
  471. from the use of this program.
  472.  
  473.     Should you find any aspect of this product undesirable, please
  474. let us know. If there is a problem, we will make every reasonable
  475. effort to correct it and send you a correction.
  476.  
  477. ACKNOWLEDGEMENTS:
  478.  
  479.     A number of friends and colleagues have provided encouragement
  480. and they have provided numerous suggestions along the way. To
  481. those people, we extend a sincere word of thanks. A special thanks
  482. to Tom Pennello of MetaWare, Inc. for providing assistance with
  483. their outstanding Professional Pascal compiler used for this product.
  484.  
  485.  
  486.  
  487.                    ProCALC ORDER/REGISTRATION FORM
  488.  
  489.  
  490.     Please check one of the following items and complete the questions
  491. below and return. The success of this product depends upon your use
  492. and support. Thank you.
  493.  
  494.  
  495.    ____ Please register my copy of ProCalc, which I have already
  496.         purchased.
  497.  
  498.    ____ Please register (_____) copies of ProCalc. The cost of
  499.         $ 20 per copy is enclosed.
  500.  
  501.    ____ Please send (_____)  ProCalc diskettes along with a
  502.         ProCalc User's Guide.  Enclosed is $ 30 per copy.
  503.  
  504.         Note:  Check here for  (____) 3 1/2-inch diskette
  505.  
  506.  
  507.         Register in the name (or ship to):
  508.  
  509.         Your name:
  510.  
  511.         Address:
  512.  
  513.         City:
  514.  
  515.         State:                        Zip:
  516.  
  517.  
  518.         Your computer make/model:
  519.  
  520.         Do you use a numeric coprocessor (8087, 80287 or 80387 chip)?
  521.  
  522.         Comments:
  523.  
  524.  
  525.  
  526.  
  527.         Please send to:     Robert Miller
  528.                             1837 Burrwood Circle
  529.                             East Lansing
  530.                             Michigan USA  48823
  531.